package db;

// Generated Mar 23, 2013 11:32:01 AM by Hibernate Tools 4.0.0

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.Generated;
import org.hibernate.annotations.GenerationTime;

/**
 * Arve generated by hbm2java
 */
@Entity
@Table(name = "arve")
public class Arve implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private int arveNr;
	private HooldusteenuseTellimus hooldusteenuseTellimus;
	private ArveSeisundiLiik arveSeisundiLiik;
	private Date loomiseAeg;
	private Date tasumiseAeg;
	private BigDecimal summa;

	@Id
	@Generated(GenerationTime.NEVER)
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name = "arve_nr", unique = true, nullable = false)
	public int getArveNr() {
		return this.arveNr;
	}

	public void setArveNr(int arveNr) {
		this.arveNr = arveNr;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "hooldusteenuse_tellimuse_nr", nullable = false)
	public HooldusteenuseTellimus getHooldusteenuseTellimus() {
		return this.hooldusteenuseTellimus;
	}

	public void setHooldusteenuseTellimus(
			HooldusteenuseTellimus hooldusteenuseTellimus) {
		this.hooldusteenuseTellimus = hooldusteenuseTellimus;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "arve_seisundi_liik", nullable = false)
	public ArveSeisundiLiik getArveSeisundiLiik() {
		return this.arveSeisundiLiik;
	}

	public void setArveSeisundiLiik(ArveSeisundiLiik arveSeisundiLiik) {
		this.arveSeisundiLiik = arveSeisundiLiik;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "loomise_aeg", nullable = false, length = 13)
	public Date getLoomiseAeg() {
		return this.loomiseAeg;
	}

	public void setLoomiseAeg(Date loomiseAeg) {
		this.loomiseAeg = loomiseAeg;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "tasumise_aeg", length = 13)
	public Date getTasumiseAeg() {
		return this.tasumiseAeg;
	}

	public void setTasumiseAeg(Date tasumiseAeg) {
		this.tasumiseAeg = tasumiseAeg;
	}

	@Column(name = "summa", nullable = false, precision = 16)
	public BigDecimal getSumma() {
		return this.summa;
	}

	public void setSumma(BigDecimal summa) {
		this.summa = summa;
	}

}
